//@<COPYRIGHT>@
//==================================================
//Copyright $2015.
//Siemens Product Lifecycle Management Software Inc.
//All Rights Reserved.
//==================================================
//@<COPYRIGHT>@

/** 
    @file 

    This file contains the implementation for the Business Object Ng4_Ext_DsgnRevision

*/

#include <Ng4_fjc_exts/Ng4_Ext_DsgnRevision.hxx>
#include <Ng4_fjc_exts/Ng4_Ext_DsgnRevisionImpl.hxx>
#include <fclasses/tc_string.h>
#include <tc/tc.h>
#include <tc/tc_errors.h>

#include <Ng4_fjc_exts/Ng4_FjcCommon.hxx>

using namespace TC9; 

//----------------------------------------------------------------------------------
// Ng4_Ext_DsgnRevisionImpl::Ng4_Ext_DsgnRevisionImpl(Ng4_Ext_DsgnRevision& busObj)
// Constructor for the class
//---------------------------------------------------------------------------------- 
Ng4_Ext_DsgnRevisionImpl::Ng4_Ext_DsgnRevisionImpl( Ng4_Ext_DsgnRevision& busObj )
   : Ng4_Ext_DsgnRevisionGenImpl( busObj ) 
{
}

//----------------------------------------------------------------------------------
// Ng4_Ext_DsgnRevisionImpl::~Ng4_Ext_DsgnRevisionImpl()
// Destructor for the class
//----------------------------------------------------------------------------------
Ng4_Ext_DsgnRevisionImpl::~Ng4_Ext_DsgnRevisionImpl()
{
}
 
//----------------------------------------------------------------------------------
// Ng4_Ext_DsgnRevisionImpl::initializeClass
// This method is used to initialize this Class
//----------------------------------------------------------------------------------
int Ng4_Ext_DsgnRevisionImpl::initializeClass()
{
    int ifail = ITK_ok;
    static bool initialized = false;

    if( !initialized )
    {
        ifail = Ng4_Ext_DsgnRevisionGenImpl::initializeClass( );
        if ( ifail == ITK_ok )
        {
            initialized = true;
        }
    }
    return ifail;
}


/**
 * Getter for a string Property
 * @param value - Parameter value
 * @param isNull - Returns true if the Parameter value is null
 * @return - Status. 0 if successful
 */
int  Ng4_Ext_DsgnRevisionImpl::getNg4_isTwoDStringBase( std::string &value, bool &isNull )
{
	int 	ifail 			= 	ITK_ok;

	bool	bDwg			=	false;

	tag_t 	tBo 			= 	NULLTAG;

	TC_write_syslog ("--->>>>> Inside getNg4_isTwoDStringBase <<<<--------\n");

	Ng4_Ext_DsgnRevision *bo = getNg4_Ext_DsgnRevision();
	tBo = ((Teamcenter::BusinessObject*)bo)->getTag();

	Ng4_FjcCommon::ng4_isTwoDString(tBo, &bDwg);

	if(true == bDwg)
	{
		value = "Yes";
		isNull = false;
	}

	return ifail;
}

/**
 * Setter for a string Property
 * @param value - Value to be set for the parameter
 * @param isNull - If true, set the parameter value to null
 * @return - Status. 0 if successful
 */
int  Ng4_Ext_DsgnRevisionImpl::setNg4_isTwoDStringBase( const std::string &value, bool isNull )
{
    int ifail = ITK_ok;

    // Your Implementation
    
    return ifail;
}
